home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 2.iso / dist / fw_libungif.idb / usr / freeware / src / libungif / patches.z / patches
Text File  |  2002-01-08  |  36KB  |  967 lines

  1. --- ./util/gif2rle.c    Mon Feb  7 20:00:26 2000
  2. +++ ../libungif-4.1.0b1/./util/gif2rle.c    Thu Nov 15 17:58:27 2001
  3. @@ -167,7 +167,7 @@
  4.              PROGRAM_NAME, ++ImageNum, Col, Row, Width, Height);
  5.          if (GifFile->Image.Left + GifFile->Image.Width > GifFile->SWidth ||
  6.             GifFile->Image.Top + GifFile->Image.Height > GifFile->SHeight) {
  7. -            fprintf(stderr, "Image %d is not confined to screen dimension, aborted.\n");
  8. +            fprintf(stderr, "Image %d is not confined to screen dimension, aborted.\n", ImageNum);
  9.              exit(EXIT_FAILURE);
  10.          }
  11.          if (GifFile->Image.Interlace) {
  12. --- ./util/gifinfo.c    Mon Feb  7 20:00:26 2000
  13. +++ ../libungif-4.1.0b1/./util/gifinfo.c    Thu Nov 15 17:56:23 2001
  14. @@ -160,7 +160,8 @@
  15.          Height = GifFile->Image.Height;
  16.          if (GifFile->Image.Left + GifFile->Image.Width > GifFile->SWidth ||
  17.             GifFile->Image.Top + GifFile->Image.Height > GifFile->SHeight) {
  18. -            fprintf(stderr, "Image %d is not confined to screen dimension, aborted.\n");
  19. +            fprintf(stderr, "Image %d is not confined to screen dimension, aborted.\n",
  20. +                GifFile->ImageCount);
  21.              exit(EXIT_FAILURE);
  22.          }
  23.                  /* We don't care about Interlaced as image is not interesting, read sequentialy */
  24. --- ./util/gif2x11.c    Sun Feb  6 23:54:21 2000
  25. +++ ../libungif-4.1.0b1/./util/gif2x11.c    Thu Nov 15 17:59:37 2001
  26. @@ -548,7 +548,7 @@
  27.      }
  28.      free(XOldColorTable);
  29.  
  30. -    sprintf(Msg, "Colors will be approximated (average error = %d).\n",
  31. +    sprintf(Msg, "Colors will be approximated (average error = %ul).\n",
  32.          AvgDistance / Count);
  33.      GIF_MESSAGE(Msg);
  34.      }
  35. --- ./ltmain.sh    Thu Jul 15 15:31:35 1999
  36. +++ ../libungif-4.1.0b1/./ltmain.sh    Thu Nov 15 15:27:55 2001
  37. @@ -54,8 +54,8 @@
  38.  # Constants.
  39.  PROGRAM=ltmain.sh
  40.  PACKAGE=libtool
  41. -VERSION=1.3.3
  42. -TIMESTAMP=" (1.385.2.181 1999/07/02 15:49:11)"
  43. +VERSION=1.3.5
  44. +TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)"
  45.  
  46.  default_mode=
  47.  help="Try \`$progname --help' for more information."
  48. @@ -435,7 +435,7 @@
  49.        fbsd_hideous_sh_bug=$base_compile
  50.  
  51.        # All platforms use -DPIC, to notify preprocessed assembler code.
  52. -      command="$base_compile $pic_flag -DPIC $srcfile"
  53. +      command="$base_compile $srcfile $pic_flag -DPIC"
  54.        if test "$build_old_libs" = yes; then
  55.      lo_libobj="$libobj"
  56.      dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
  57. @@ -521,9 +521,17 @@
  58.        exit $error
  59.      fi
  60.  
  61. +    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
  62. +    if test "X$xdir" = "X$obj"; then
  63. +      xdir="."
  64. +    else
  65. +      xdir="$xdir"
  66. +    fi
  67. +    baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
  68. +    libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
  69.      # Now arrange that obj and lo_libobj become the same file
  70. -    $show "$LN_S $obj $lo_libobj"
  71. -    if $run $LN_S $obj $lo_libobj; then
  72. +    $show "(cd $xdir && $LN_S $baseobj $libobj)"
  73. +    if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
  74.        exit 0
  75.      else
  76.        error=$?
  77. @@ -613,8 +621,6 @@
  78.    # libtool link mode
  79.    link)
  80.      modename="$modename: link"
  81. -    C_compiler="$CC" # save it, to compile generated C sources
  82. -    CC="$nonopt"
  83.      case "$host" in
  84.      *-*-cygwin* | *-*-mingw* | *-*-os2*)
  85.        # It is impossible to link a dll without this setting, and
  86. @@ -802,8 +808,8 @@
  87.        allow_undefined=yes
  88.        ;;
  89.      esac
  90. -    compile_command="$CC"
  91. -    finalize_command="$CC"
  92. +    compile_command="$nonopt"
  93. +    finalize_command="$nonopt"
  94.  
  95.      compile_rpath=
  96.      finalize_rpath=
  97. @@ -1691,7 +1697,7 @@
  98.  
  99.      irix)
  100.        major=`expr $current - $age + 1`
  101. -      versuffix="$major.$revision"
  102. +      versuffix=".$major"
  103.        verstring="sgi$major.$revision"
  104.  
  105.        # Add in all the interfaces that we are compatible with.
  106. @@ -1789,6 +1795,10 @@
  107.      *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
  108.        # these systems don't actually have a c library (as such)!
  109.        ;;
  110. +        *-*-rhapsody*)
  111. +      # rhapsody is a little odd...
  112. +      deplibs="$deplibs -framework System"
  113. +      ;;
  114.      *)
  115.        # Add libc to deplibs on all other systems.
  116.        deplibs="$deplibs -lc"
  117. @@ -1851,7 +1861,7 @@
  118.        int main() { return 0; }
  119.  EOF
  120.        $rm conftest
  121. -      $C_compiler -o conftest conftest.c $deplibs
  122. +      $CC -o conftest conftest.c $deplibs
  123.        if test $? -eq 0 ; then
  124.          ldd_output=`ldd conftest`
  125.          for i in $deplibs; do
  126. @@ -1884,7 +1894,7 @@
  127.           # If $name is empty we are operating on a -L argument.
  128.            if test "$name" != "" ; then
  129.          $rm conftest
  130. -        $C_compiler -o conftest conftest.c $i
  131. +        $CC -o conftest conftest.c $i
  132.          # Did it work?
  133.          if test $? -eq 0 ; then
  134.            ldd_output=`ldd conftest`
  135. @@ -2047,13 +2057,20 @@
  136.      done
  137.  
  138.      # Ensure that we have .o objects for linkers which dislike .lo
  139. -    # (e.g. aix) incase we are running --disable-static
  140. +    # (e.g. aix) in case we are running --disable-static
  141.      for obj in $libobjs; do
  142. -      oldobj=`$echo "X$obj" | $Xsed -e "$lo2o"`
  143. -      if test ! -f $oldobj; then
  144. -        $show "${LN_S} $obj $oldobj"
  145. -        $run ${LN_S} $obj $oldobj || exit $?
  146. +      xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
  147. +      if test "X$xdir" = "X$obj"; then
  148. +        xdir="."
  149. +      else
  150. +        xdir="$xdir"
  151.        fi
  152. +      baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
  153. +      oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
  154. +      if test ! -f $xdir/$oldobj; then
  155. +        $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
  156. +        $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
  157. +      fi
  158.      done
  159.  
  160.      # Use standard objects if they are pic
  161. @@ -2311,8 +2328,16 @@
  162.      # Just create a symlink.
  163.      $show $rm $libobj
  164.      $run $rm $libobj
  165. -    $show "$LN_S $obj $libobj"
  166. -    $run $LN_S $obj $libobj || exit $?
  167. +    xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
  168. +    if test "X$xdir" = "X$libobj"; then
  169. +      xdir="."
  170. +    else
  171. +      xdir="$xdir"
  172. +    fi
  173. +    baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
  174. +    oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
  175. +    $show "(cd $xdir && $LN_S $oldobj $baseobj)"
  176. +    $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
  177.        fi
  178.  
  179.        if test -n "$gentop"; then
  180. @@ -2598,16 +2623,21 @@
  181.        # linked before any other PIC object.  But we must not use
  182.        # pic_flag when linking with -static.  The problem exists in
  183.        # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
  184. -      *-*-freebsd2*|*-*-freebsd3.0*)
  185. +      *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
  186.          case "$compile_command " in
  187.          *" -static "*) ;;
  188.          *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
  189. +        esac;;
  190. +      *-*-hpux*)
  191. +        case "$compile_command " in
  192. +        *" -static "*) ;;
  193. +        *) pic_flag_for_symtable=" $pic_flag -DPIC";;
  194.          esac
  195.        esac
  196.  
  197.        # Now compile the dynamic symbol file.
  198. -      $show "(cd $output_objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
  199. -      $run eval '(cd $output_objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
  200. +      $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
  201. +      $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
  202.  
  203.        # Clean up the generated files.
  204.        $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
  205. @@ -2776,7 +2806,7 @@
  206.  
  207.  # The HP-UX ksh and POSIX shell print the target directory to stdout
  208.  # if CDPATH is set.
  209. -if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi
  210. +if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
  211.  
  212.  relink_command=\"$relink_command\"
  213.  
  214. @@ -2865,7 +2895,7 @@
  215.    fi"
  216.      else
  217.        echo >> $output "\
  218. -  program='$outputname$exeext'
  219. +  program='$outputname'
  220.    progdir=\"\$thisdir/$objdir\"
  221.  "
  222.      fi
  223. @@ -2901,13 +2931,21 @@
  224.        # Run the actual program with our arguments.
  225.  "
  226.      case $host in
  227. -    *-*-cygwin* | *-*-mingw | *-*-os2*)
  228.        # win32 systems need to use the prog path for dll
  229.        # lookup to work
  230. +    *-*-cygwin*)
  231. +      $echo >> $output "\
  232. +      exec \$progdir/\$program \${1+\"\$@\"}
  233. +"
  234. +      ;;
  235. +
  236. +    # Backslashes separate directories on plain windows
  237. +    *-*-mingw | *-*-os2*)
  238.        $echo >> $output "\
  239.        exec \$progdir\\\\\$program \${1+\"\$@\"}
  240.  "
  241.        ;;
  242. +
  243.      *)
  244.        $echo >> $output "\
  245.        # Export the path to the program.
  246. @@ -2995,14 +3033,21 @@
  247.        if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
  248.      eval cmds=\"$old_archive_from_new_cmds\"
  249.        else
  250. -    # Ensure that we have .o objects in place incase we decided
  251. +    # Ensure that we have .o objects in place in case we decided
  252.      # not to build a shared library, and have fallen back to building
  253.      # static libs even though --disable-static was passed!
  254.      for oldobj in $oldobjs; do
  255.        if test ! -f $oldobj; then
  256. -        obj=`$echo "X$oldobj" | $Xsed -e "$o2lo"`
  257. -        $show "${LN_S} $obj $oldobj"
  258. -        $run ${LN_S} $obj $oldobj || exit $?
  259. +        xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
  260. +        if test "X$xdir" = "X$oldobj"; then
  261. +          xdir="."
  262. +        else
  263. +          xdir="$xdir"
  264. +        fi
  265. +        baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
  266. +        obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
  267. +        $show "(cd $xdir && ${LN_S} $obj $baseobj)"
  268. +        $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
  269.        fi
  270.      done
  271.  
  272. @@ -3672,8 +3717,10 @@
  273.      done
  274.  
  275.      if test -z "$run"; then
  276. -      # Export the shlibpath_var.
  277. -      eval "export $shlibpath_var"
  278. +      if test -n "$shlibpath_var"; then
  279. +        # Export the shlibpath_var.
  280. +        eval "export $shlibpath_var"
  281. +      fi
  282.  
  283.        # Restore saved enviroment variables
  284.        if test "${save_LC_ALL+set}" = set; then
  285. @@ -3690,8 +3737,10 @@
  286.        exit 1
  287.      else
  288.        # Display what would be done.
  289. -      eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
  290. -      $echo "export $shlibpath_var"
  291. +      if test -n "$shlibpath_var"; then
  292. +        eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
  293. +        $echo "export $shlibpath_var"
  294. +      fi
  295.        $echo "$cmd$args"
  296.        exit 0
  297.      fi
  298. --- ./ltconfig    Thu Jul 15 15:31:35 1999
  299. +++ ../libungif-4.1.0b1/./ltconfig    Thu Nov 15 17:21:31 2001
  300. @@ -53,7 +53,7 @@
  301.  
  302.  # Find the correct PATH separator.  Usually this is `:', but
  303.  # DJGPP uses `;' like DOS.
  304. -if test "X${PATH_SEPARATOR+set}" != "Xset"; then
  305. +if test "X${PATH_SEPARATOR+set}" != Xset; then
  306.    UNAME=${UNAME-`uname 2>/dev/null`}
  307.    case X$UNAME in
  308.      *-DOS) PATH_SEPARATOR=';' ;;
  309. @@ -63,9 +63,9 @@
  310.  
  311.  # The HP-UX ksh and POSIX shell print the target directory to stdout
  312.  # if CDPATH is set.
  313. -if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
  314. +if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  315.  
  316. -if test "X${echo_test_string+set}" != "Xset"; then
  317. +if test "X${echo_test_string+set}" != Xset; then
  318.    # find a string as large as possible, as long as the shell can cope with it
  319.    for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
  320.      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
  321. @@ -169,10 +169,10 @@
  322.  # Constants:
  323.  PROGRAM=ltconfig
  324.  PACKAGE=libtool
  325. -VERSION=1.3.3
  326. -TIMESTAMP=" (1.385.2.181 1999/07/02 15:49:11)"
  327. -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
  328. -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
  329. +VERSION=1.3.5
  330. +TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)"
  331. +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  332. +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  333.  rm="rm -f"
  334.  
  335.  help="Try \`$progname --help' for more information."
  336. @@ -369,8 +369,8 @@
  337.  # Only set LANG and LC_ALL to C if already set.
  338.  # These must not be set unconditionally because not all systems understand
  339.  # e.g. LANG=C (notably SCO).
  340. -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  341. -if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  342. +if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
  343. +if test "X${LANG+set}"   = Xset; then LANG=C;   export LANG;   fi
  344.  
  345.  if test -n "$cache_file" && test -r "$cache_file"; then
  346.    echo "loading cache $cache_file within ltconfig"
  347. @@ -462,7 +462,7 @@
  348.    # AIX sometimes has problems with the GCC collect2 program.  For some
  349.    # reason, if we set the COLLECT_NAMES environment variable, the problems
  350.    # vanish in a puff of smoke.
  351. -  if test "${COLLECT_NAMES+set}" != set; then
  352. +  if test "X${COLLECT_NAMES+set}" != Xset; then
  353.      COLLECT_NAMES=
  354.      export COLLECT_NAMES
  355.    fi
  356. @@ -663,7 +663,7 @@
  357.    link_static_flag='-static'
  358.  
  359.    case "$host_os" in
  360. -  beos* | irix5* | irix6* | osf3* | osf4*)
  361. +  beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
  362.      # PIC is the default for these OSes.
  363.      ;;
  364.    aix*)
  365. @@ -718,7 +718,7 @@
  366.      # We can build DLLs from non-PIC.
  367.      ;;
  368.  
  369. -  osf3* | osf4*)
  370. +  osf3* | osf4* | osf5*)
  371.      # All OSF/1 code is PIC.
  372.      wl='-Wl,'
  373.      link_static_flag='-non_shared'
  374. @@ -1164,15 +1164,21 @@
  375.      # Extract the symbol export list from an `--export-all' def file,
  376.      # then regenerate the def file from the symbol export list, so that
  377.      # the compiled dll only exports the symbol export list.
  378. +    # Be careful not to strip the DATA tag left by newer dlltools.
  379.      export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
  380.        test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
  381.        $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def  $objdir/$soname-ltdll.$objext $libobjs $convenience~
  382. -      sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols'
  383. +      sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $objdir/$soname-def > $export_symbols'
  384.  
  385. +    # If DATA tags from a recent dlltool are present, honour them!
  386.      archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
  387.        _lt_hint=1;
  388. -      for symbol in `cat $export_symbols`; do
  389. -    echo "    \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def;
  390. +      cat $export_symbols | while read symbol; do
  391. +        set dummy \$symbol;
  392. +        case \$# in
  393. +          2) echo "    \$2 @ \$_lt_hint ; " >> $objdir/$soname-def;;
  394. +          *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $objdir/$soname-def;;
  395. +        esac;
  396.      _lt_hint=`expr 1 + \$_lt_hint`;
  397.        done~
  398.        test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
  399. @@ -1187,7 +1193,7 @@
  400.      ;;
  401.  
  402.    netbsd*)
  403. -    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  404. +    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  405.        archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
  406.        archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  407.      else
  408. @@ -1196,7 +1202,7 @@
  409.      fi
  410.      ;;
  411.  
  412. -  solaris*)
  413. +  solaris* | sysv5*)
  414.      if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
  415.        ld_shlibs=no
  416.        cat <<EOF 1>&2
  417. @@ -1244,7 +1250,12 @@
  418.        whole_archive_flag_spec=
  419.        ;;
  420.      *)
  421. -      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  422. +      # ancient GNU ld didn't support --whole-archive et. al.
  423. +      if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
  424. +        whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  425. +      else
  426. +        whole_archive_flag_spec=
  427. +      fi
  428.        ;;
  429.      esac
  430.    fi
  431. @@ -1371,9 +1382,9 @@
  432.  
  433.    irix5* | irix6*)
  434.      if test "$with_gcc" = yes; then
  435. -      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  436. +      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$extraverstring$verstring" && echo ${wl}-set_version ${wl}$extraverstring$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  437.      else
  438. -      archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  439. +      archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$extraverstring$verstring" && echo -set_version $extraverstring$verstring` -update_registry ${objdir}/so_locations -o $lib'
  440.      fi
  441.      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  442.      hardcode_libdir_separator=:
  443. @@ -1405,7 +1416,7 @@
  444.      old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
  445.      ;;
  446.  
  447. -  osf3* | osf4*)
  448. +  osf3*)
  449.      if test "$with_gcc" = yes; then
  450.        allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
  451.        archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  452. @@ -1417,6 +1428,24 @@
  453.      hardcode_libdir_separator=:
  454.      ;;
  455.  
  456. +  osf4* | osf5*)  # As osf3* with the addition of the -msym flag
  457. +    if test "$with_gcc" = yes; then
  458. +      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
  459. +      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  460. +    else
  461. +      allow_undefined_flag=' -expect_unresolved \*'
  462. +      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  463. +    fi
  464. +    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  465. +    hardcode_libdir_separator=:
  466. +    ;;
  467. +  rhapsody*)
  468. +    archive_cmds='$CC -bundle -undefined suppress -o $lib $libobjs $deplibs $linkopts'
  469. +    hardcode_libdir_flags_spec='-L$libdir'
  470. +    hardcode_direct=yes
  471. +    hardcode_shlibpath_var=no
  472. +    ;;
  473. +                                       
  474.    sco3.2v5*)
  475.      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  476.      hardcode_shlibpath_var=no
  477. @@ -1449,7 +1478,13 @@
  478.      ;;
  479.  
  480.    sysv4)
  481. -    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  482. +    if test "x$host_vendor" = xsequent; then
  483. +      # Use $CC to link under sequent, because it throws in some extra .o 
  484. +      # files that make .init and .fini sections work.
  485. +      archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $linkopts'
  486. +    else
  487. +      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  488. +    fi
  489.      runpath_var='LD_RUN_PATH'
  490.      hardcode_shlibpath_var=no
  491.      hardcode_direct=no #Motorola manual says yes, but my tests say they lie 
  492. @@ -1461,6 +1496,18 @@
  493.      export_dynamic_flag_spec='-Bexport'
  494.      ;;
  495.  
  496. +  sysv5*)
  497. +    no_undefined_flag=' -z text'
  498. +    # $CC -shared without GNU ld will not create a library from C++
  499. +    # object files and a static libstdc++, better avoid it by now
  500. +    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
  501. +    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  502. +        $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
  503. +    hardcode_libdir_flag_spec=
  504. +    hardcode_shlibpath_var=no
  505. +    runpath_var='LD_RUN_PATH'
  506. +    ;;
  507. +
  508.    uts4*)
  509.      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  510.      hardcode_libdir_flag_spec='-L$libdir'
  511. @@ -1474,16 +1521,30 @@
  512.      ;;
  513.  
  514.    sysv4*MP*)
  515. -    if test -d /usr/nec ;then
  516. -    # archive_cmds='$LD -G -z text -h $soname -o $lib$libobjs$deplibs'
  517. -    archive_cmds='$LD -G -h $soname -o $lib$libobjs$deplibs'
  518. +    if test -d /usr/nec; then
  519. +      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  520. +      hardcode_shlibpath_var=no
  521. +      runpath_var=LD_RUN_PATH
  522. +      hardcode_runpath_var=yes
  523. +      ld_shlibs=yes
  524. +    fi
  525. +    ;;
  526. +
  527. +  sysv4.2uw2*)
  528. +    archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts'
  529. +    hardcode_direct=yes
  530. +    hardcode_minus_L=no
  531.      hardcode_shlibpath_var=no
  532. -    runpath_var=LD_RUN_PATH
  533.      hardcode_runpath_var=yes
  534. -    ld_shlibs=yes
  535. -    fi
  536. +    runpath_var=LD_RUN_PATH
  537.      ;;
  538.  
  539. +  unixware7*)
  540. +    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  541. +    runpath_var='LD_RUN_PATH'
  542. +    hardcode_shlibpath_var=no
  543. +    ;;
  544. +
  545.    *)
  546.      ld_shlibs=no
  547.      ;;
  548. @@ -1589,11 +1650,11 @@
  549.  main(){nm_test_var='a';nm_test_func();return(0);}
  550.  EOF
  551.  
  552. -  echo "$progname:1592: checking if global_symbol_pipe works" >&5
  553. -  if { (eval echo $progname:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
  554. +  echo "$progname:1653: checking if global_symbol_pipe works" >&5
  555. +  if { (eval echo $progname:1654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
  556.      # Now try to grab the symbols.
  557.      nlist=conftest.nm
  558. -    if { echo "$progname:1596: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
  559. +    if { echo "$progname:1657: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
  560.  
  561.        # Try sorting and uniquifying the output.
  562.        if sort "$nlist" | uniq > "$nlist"T; then
  563. @@ -1645,7 +1706,7 @@
  564.        save_CFLAGS="$CFLAGS"
  565.        LIBS="conftstm.$objext"
  566.        CFLAGS="$CFLAGS$no_builtin_flag"
  567. -      if { (eval echo $progname:1648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  568. +      if { (eval echo $progname:1709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  569.          pipe_works=yes
  570.        else
  571.          echo "$progname: failed program was:" >&5
  572. @@ -1787,8 +1848,9 @@
  573.  
  574.  bsdi4*)
  575.    version_type=linux
  576. -  library_names_spec='${libname}.so$major ${libname}.so'
  577. -  soname_spec='${libname}.so'
  578. +  need_version=no
  579. +  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  580. +  soname_spec='${libname}${release}.so$major'
  581.    finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  582.    shlibpath_var=LD_LIBRARY_PATH
  583.    deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
  584. @@ -1796,6 +1858,7 @@
  585.    file_magic_test_file=/shlib/libc.so
  586.    sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  587.    sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  588. +  export_dynamic_flag_spec=-rdynamic
  589.    # the default ld.so.conf also contains /usr/contrib/lib and
  590.    # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  591.    # libtool to hard-code these into programs
  592. @@ -1841,10 +1904,9 @@
  593.        need_version=yes
  594.        ;;
  595.    esac
  596. -  finish_cmds='PATH="\$PATH:/sbin" OBJFORMAT="'"$objformat"'" ldconfig -m $libdir'
  597.    shlibpath_var=LD_LIBRARY_PATH
  598.    case "$host_os" in
  599. -  freebsd2* | freebsd3.[01]*)
  600. +  freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*)
  601.      shlibpath_overrides_runpath=yes
  602.      ;;
  603.    *) # from 3.2 on
  604. @@ -1875,6 +1937,14 @@
  605.    soname_spec='${libname}${release}.sl$major'
  606.    # HP-UX runs *really* slowly unless shared libraries are mode 555.
  607.    postinstall_cmds='chmod 555 $lib'
  608. +  case "$host_os" in
  609. +  hpux10.20*)
  610. +    # TODO:  Does this work for hpux-11 too?
  611. +    deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
  612. +    file_magic_cmd=/usr/bin/file
  613. +    file_magic_test_file=/usr/lib/libc.sl
  614. +    ;;
  615. +  esac
  616.    ;;
  617.  
  618.  irix5* | irix6*)
  619. @@ -1881,8 +1951,8 @@
  620.    version_type=irix
  621.    need_lib_prefix=no
  622.    need_version=no
  623. -  soname_spec='${libname}${release}.so.$major'
  624. -  library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so'
  625. +  soname_spec='${libname}${release}.so$versuffix'
  626. +  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
  627.    case "$host_os" in
  628.    irix5*)
  629.      libsuff= shlibsuff=
  630. @@ -1896,8 +1966,6 @@
  631.      *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
  632.      *) libsuff= shlibsuff= libmagic=never-match;;
  633.      esac
  634. -    # this will be overridden with pass_all, but let us keep it just in case
  635. -    deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
  636.      ;;
  637.    esac
  638.    shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  639. @@ -1924,9 +1992,7 @@
  640.    finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  641.    shlibpath_var=LD_LIBRARY_PATH
  642.    shlibpath_overrides_runpath=no
  643. -  deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
  644. -  file_magic_cmd=/usr/bin/file
  645. -  file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  646. +  deplibs_check_method=pass_all
  647.  
  648.    if test -f /lib/ld.so.1; then
  649.      dynamic_linker='GNU ld.so'
  650. @@ -1972,7 +2038,7 @@
  651.    shlibpath_var=LIBPATH
  652.    ;;
  653.  
  654. -osf3* | osf4*)
  655. +osf3* | osf4* | osf5*)
  656.    version_type=osf
  657.    need_version=no
  658.    soname_spec='${libname}${release}.so'
  659. @@ -1987,6 +2053,14 @@
  660.    sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  661.    ;;
  662.  
  663. +rhapsody*)
  664. +  version_type=sunos
  665. +  library_names_spec='${libname}.so'
  666. +  soname_spec='${libname}.so'
  667. +  shlibpath_var=DYLD_LIBRARY_PATH
  668. +  deplibs_check_method=pass_all
  669. +  ;;
  670. +
  671.  sco3.2v5*)
  672.    version_type=osf
  673.    soname_spec='${libname}${release}.so$major'
  674. @@ -2027,6 +2101,10 @@
  675.    soname_spec='${libname}${release}.so$major'
  676.    shlibpath_var=LD_LIBRARY_PATH
  677.    case "$host_vendor" in
  678. +    sequent)
  679. +      file_magic_cmd='/bin/file'
  680. +      deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
  681. +      ;;
  682.      ncr)
  683.        deplibs_check_method='pass_all'
  684.        ;;
  685. @@ -2167,7 +2245,7 @@
  686.  if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
  687.    lt_cv_dlopen=no lt_cv_dlopen_libs=
  688.  echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
  689. -echo "$progname:2170: checking for dlopen in -ldl" >&5
  690. +echo "$progname:2248: checking for dlopen in -ldl" >&5
  691.  ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  692.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  693.    echo $ac_n "(cached) $ac_c" 1>&6
  694. @@ -2175,10 +2253,13 @@
  695.    ac_save_LIBS="$LIBS"
  696.  LIBS="-ldl  $LIBS"
  697.  cat > conftest.$ac_ext <<EOF
  698. -#line 2178 "ltconfig"
  699. +#line 2256 "ltconfig"
  700.  /* Override any gcc2 internal prototype to avoid an error.  */
  701.  /* We use char because int might match the return type of a gcc2
  702.      builtin and then its argument prototype would still apply.  */
  703. +#ifdef __cplusplus
  704. +extern "C"
  705. +#endif
  706.  char dlopen();
  707.  
  708.  int main() {
  709. @@ -2185,7 +2266,7 @@
  710.  dlopen()
  711.  ; return 0; }
  712.  EOF
  713. -if { (eval echo $progname:2188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  714. +if { (eval echo $progname:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  715.    rm -rf conftest*
  716.    eval "ac_cv_lib_$ac_lib_var=yes"
  717.  else
  718. @@ -2204,12 +2285,12 @@
  719.  else
  720.    echo "$ac_t""no" 1>&6
  721.  echo $ac_n "checking for dlopen""... $ac_c" 1>&6
  722. -echo "$progname:2207: checking for dlopen" >&5
  723. +echo "$progname:2288: checking for dlopen" >&5
  724.  if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
  725.    echo $ac_n "(cached) $ac_c" 1>&6
  726.  else
  727.    cat > conftest.$ac_ext <<EOF
  728. -#line 2212 "ltconfig"
  729. +#line 2293 "ltconfig"
  730.  /* System header to define __stub macros and hopefully few prototypes,
  731.      which can conflict with char dlopen(); below.  */
  732.  #include <assert.h>
  733. @@ -2216,6 +2297,9 @@
  734.  /* Override any gcc2 internal prototype to avoid an error.  */
  735.  /* We use char because int might match the return type of a gcc2
  736.      builtin and then its argument prototype would still apply.  */
  737. +#ifdef __cplusplus
  738. +extern "C"
  739. +#endif
  740.  char dlopen();
  741.  
  742.  int main() {
  743. @@ -2231,7 +2315,7 @@
  744.  
  745.  ; return 0; }
  746.  EOF
  747. -if { (eval echo $progname:2234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  748. +if { (eval echo $progname:2318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  749.    rm -rf conftest*
  750.    eval "ac_cv_func_dlopen=yes"
  751.  else
  752. @@ -2248,7 +2332,7 @@
  753.  else
  754.    echo "$ac_t""no" 1>&6
  755.  echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
  756. -echo "$progname:2251: checking for dld_link in -ldld" >&5
  757. +echo "$progname:2335: checking for dld_link in -ldld" >&5
  758.  ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
  759.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  760.    echo $ac_n "(cached) $ac_c" 1>&6
  761. @@ -2256,10 +2340,13 @@
  762.    ac_save_LIBS="$LIBS"
  763.  LIBS="-ldld  $LIBS"
  764.  cat > conftest.$ac_ext <<EOF
  765. -#line 2259 "ltconfig"
  766. +#line 2343 "ltconfig"
  767.  /* Override any gcc2 internal prototype to avoid an error.  */
  768.  /* We use char because int might match the return type of a gcc2
  769.      builtin and then its argument prototype would still apply.  */
  770. +#ifdef __cplusplus
  771. +extern "C"
  772. +#endif
  773.  char dld_link();
  774.  
  775.  int main() {
  776. @@ -2266,7 +2353,7 @@
  777.  dld_link()
  778.  ; return 0; }
  779.  EOF
  780. -if { (eval echo $progname:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  781. +if { (eval echo $progname:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  782.    rm -rf conftest*
  783.    eval "ac_cv_lib_$ac_lib_var=yes"
  784.  else
  785. @@ -2285,12 +2372,12 @@
  786.  else
  787.    echo "$ac_t""no" 1>&6
  788.  echo $ac_n "checking for shl_load""... $ac_c" 1>&6
  789. -echo "$progname:2288: checking for shl_load" >&5
  790. +echo "$progname:2375: checking for shl_load" >&5
  791.  if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
  792.    echo $ac_n "(cached) $ac_c" 1>&6
  793.  else
  794.    cat > conftest.$ac_ext <<EOF
  795. -#line 2293 "ltconfig"
  796. +#line 2380 "ltconfig"
  797.  /* System header to define __stub macros and hopefully few prototypes,
  798.      which can conflict with char shl_load(); below.  */
  799.  #include <assert.h>
  800. @@ -2297,6 +2384,9 @@
  801.  /* Override any gcc2 internal prototype to avoid an error.  */
  802.  /* We use char because int might match the return type of a gcc2
  803.      builtin and then its argument prototype would still apply.  */
  804. +#ifdef __cplusplus
  805. +extern "C"
  806. +#endif
  807.  char shl_load();
  808.  
  809.  int main() {
  810. @@ -2312,7 +2402,7 @@
  811.  
  812.  ; return 0; }
  813.  EOF
  814. -if { (eval echo $progname:2315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  815. +if { (eval echo $progname:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  816.    rm -rf conftest*
  817.    eval "ac_cv_func_shl_load=yes"
  818.  else
  819. @@ -2330,7 +2420,7 @@
  820.  else
  821.    echo "$ac_t""no" 1>&6
  822.  echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
  823. -echo "$progname:2333: checking for shl_load in -ldld" >&5
  824. +echo "$progname:2423: checking for shl_load in -ldld" >&5
  825.  ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  826.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  827.    echo $ac_n "(cached) $ac_c" 1>&6
  828. @@ -2338,11 +2428,14 @@
  829.    ac_save_LIBS="$LIBS"
  830.  LIBS="-ldld  $LIBS"
  831.  cat > conftest.$ac_ext <<EOF
  832. -#line 2341 "ltconfig"
  833. +#line 2431 "ltconfig"
  834.  #include "confdefs.h"
  835.  /* Override any gcc2 internal prototype to avoid an error.  */
  836.  /* We use char because int might match the return type of a gcc2
  837.      builtin and then its argument prototype would still apply.  */
  838. +#ifdef __cplusplus
  839. +extern "C"
  840. +#endif
  841.  char shl_load();
  842.  
  843.  int main() {
  844. @@ -2349,7 +2442,7 @@
  845.  shl_load()
  846.  ; return 0; }
  847.  EOF
  848. -if { (eval echo $progname:2352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  849. +if { (eval echo $progname:2445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  850.    rm -rf conftest*
  851.    eval "ac_cv_lib_$ac_lib_var=yes"
  852.  else
  853. @@ -2392,17 +2485,17 @@
  854.  for ac_hdr in dlfcn.h; do
  855.  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  856.  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  857. -echo "$progname:2395: checking for $ac_hdr" >&5
  858. +echo "$progname:2488: checking for $ac_hdr" >&5
  859.  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  860.    echo $ac_n "(cached) $ac_c" 1>&6
  861.  else
  862.    cat > conftest.$ac_ext <<EOF
  863. -#line 2400 "ltconfig"
  864. +#line 2493 "ltconfig"
  865.  #include <$ac_hdr>
  866.  int fnord = 0;
  867.  EOF
  868. -ac_try="$ac_compile conftest.$ac_ext >/dev/null 2>conftest.out"
  869. -{ (eval echo $progname:2405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  870. +ac_try="$ac_compile >/dev/null 2>conftest.out"
  871. +{ (eval echo $progname:2498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  872.  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  873.  if test -z "$ac_err"; then
  874.    rm -rf conftest*
  875. @@ -2430,7 +2523,7 @@
  876.      LIBS="$lt_cv_dlopen_libs $LIBS"
  877.  
  878.    echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
  879. -echo "$progname:2433: checking whether a program can dlopen itself" >&5
  880. +echo "$progname:2526: checking whether a program can dlopen itself" >&5
  881.  if test "${lt_cv_dlopen_self+set}" = set; then
  882.    echo $ac_n "(cached) $ac_c" 1>&6
  883.  else
  884. @@ -2438,7 +2531,7 @@
  885.      lt_cv_dlopen_self=cross
  886.    else
  887.      cat > conftest.c <<EOF
  888. -#line 2441 "ltconfig"
  889. +#line 2534 "ltconfig"
  890.  
  891.  #if HAVE_DLFCN_H
  892.  #include <dlfcn.h>
  893. @@ -2484,7 +2577,7 @@
  894.             if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 
  895.  
  896.  EOF
  897. -if { (eval echo $progname:2487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  898. +if { (eval echo $progname:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  899.  then
  900.    lt_cv_dlopen_self=yes
  901.  else
  902. @@ -2503,7 +2596,7 @@
  903.    if test "$lt_cv_dlopen_self" = yes; then
  904.      LDFLAGS="$LDFLAGS $link_static_flag"
  905.    echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
  906. -echo "$progname:2506: checking whether a statically linked program can dlopen itself" >&5
  907. +echo "$progname:2599: checking whether a statically linked program can dlopen itself" >&5
  908.  if test "${lt_cv_dlopen_self_static+set}" = set; then
  909.    echo $ac_n "(cached) $ac_c" 1>&6
  910.  else
  911. @@ -2511,7 +2604,7 @@
  912.      lt_cv_dlopen_self_static=cross
  913.    else
  914.      cat > conftest.c <<EOF
  915. -#line 2514 "ltconfig"
  916. +#line 2607 "ltconfig"
  917.  
  918.  #if HAVE_DLFCN_H
  919.  #include <dlfcn.h>
  920. @@ -2557,7 +2650,7 @@
  921.      if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 
  922.  
  923.  EOF
  924. -if { (eval echo $progname:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  925. +if { (eval echo $progname:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  926.  then
  927.    lt_cv_dlopen_self_static=yes
  928.  else
  929. @@ -2649,7 +2742,7 @@
  930.  # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
  931.  #
  932.  # Copyright (C) 1996-1999 Free Software Foundation, Inc.
  933. -# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  934. +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  935.  #
  936.  # This program is free software; you can redistribute it and/or modify
  937.  # it under the terms of the GNU General Public License as published by
  938. @@ -2675,7 +2768,7 @@
  939.  
  940.  # The HP-UX ksh and POSIX shell print the target directory to stdout
  941.  # if CDPATH is set.
  942. -if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
  943. +if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  944.  
  945.  ### BEGIN LIBTOOL CONFIG
  946.  EOF
  947. @@ -2938,7 +3031,7 @@
  948.  # AIX sometimes has problems with the GCC collect2 program.  For some
  949.  # reason, if we set the COLLECT_NAMES environment variable, the problems
  950.  # vanish in a puff of smoke.
  951. -if test "${COLLECT_NAMES+set}" != set; then
  952. +if test "X${COLLECT_NAMES+set}" != Xset; then
  953.    COLLECT_NAMES=
  954.    export COLLECT_NAMES
  955.  fi
  956. @@ -2948,6 +3041,10 @@
  957.  
  958.    # Append the ltmain.sh script.
  959.    sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
  960. +  # We use sed instead of cat because bash on DJGPP gets confused if
  961. +  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
  962. +  # text mode, it properly converts lines to CR/LF.  This bash problem
  963. +  # is reportedly fixed, but why not run on old versions too?
  964.  
  965.    chmod +x "$ofile"
  966.    ;;
  967.